{% extends "create-account.html" %}
{% block subtitle %}Reset Password{% endblock %}
{% block instructions %}
        If you've forgotten your password, you can reset it by entering your
        account name or the email address used to register your account.
        We will then send an email to this address which will include a URL
        that you can click to reset your password.
{% endblock %}
{% block progress %}
        <li{% if not activation and not email_sent %} class="current_step"{% endif %}>Enter account name or email
        <li{% if email_sent %} class="current_step"{% endif %}>Generate password reset email
        <li{% if activation %} class="current_step"{% endif %}>Enter activation code and set a new password
{% endblock %}
{% block form %}
{%   if email_sent %}
        An email has been sent to the address registered with this account.
        This email contains a URL that you must click in order to reset the
        password of this account.  Once you click it, you can set the password
        to whatever you like.
{%   else %}
      <form method="POST" action="/reset-password">
        <table class="form">
{%     if activation %}
          <input type="hidden" name="id" value="{{ id|escape }}">
          <input type="hidden" name="activation" value="{{ activation|escape }}">
          <tr>
            <td class="label">
              Choose new password:
            </td>
            <td>
              <input type="password" name="password1" size="20">
            </td>
          </tr>
          <tr>
            <td class="label">
              Confirm password:
              <br>
              <span class="tip">
{%       if error %}
                <span class="error">{{ error|escape }}</span>
                <br>
{%       endif %}
              </span>
            </td>
            <td>
              <input type="password" name="password2" size="20">
            </td>
          </tr>
{%     else %}
          <tr>
            <td class="label">
              Account:
              <br>
              <span class="tip">
{%       if error %}
                <span class="error">{{ error|escape }}</span>
                <br>
{%       endif %}
                This can be either the name of your account or your email address.
              </span>
            </td>
            <td>
              <input type="text" name="id" size="20" maxlength="32">
            </td>
          </tr>
{%     endif %}
          <tr>
            <td colspan="2" class="control">
              <input id="create_account_button" type="submit" value="Reset Password">
            </td>
          </tr>
        </table>
      </form>
{%   endif %}
{% endblock %}
